
export default {
  namespaced: true,
  state: {
    //菜单信息
    menu: [
      {
        id: "1",
        path: "/index/homePage",
        name: "homePage",
        icon: "el-icon-info",
        lable: "首页",
        url: "homePage / index",
      },
      {
        id: "2",
        lable: "商品管理",
        icon: "el-icon-mobile-phone",
        children: [
          {
            id: "2-1",
            path: "/index/goods",
            name: "goods",
            lable: "商品信息",
            url: "goods / index",
          },
        ],
      },
      {
        id: "3",
        lable: "订单管理",
        icon: "el-icon-bell",
        children: [
          {
            id: "3-1",
            path: "/index/order",
            name: "order",
            lable: "订单",
            url: "order / index",
          },
        ],
      },
      {
        id: "4",
        lable: "系统管理",
        icon: "el-icon-setting",
        children: [
          {
            id: "4-1",
            path: "/index/stytem",
            name: "stytem",
            lable: "用户管理",
            url: "stytem / index",
          },
        ],
      },
    ],
    isCollapse: false, //控制导航折叠
    showSreadcrumb: 'null'

  },
  mutations: {
    collapse(state) {
      state.isCollapse = !state.isCollapse
    },
    breadcrumb(state, val) {
      val.name == 'homePage' ? (state.showSreadcrumb = null) : state.showSreadcrumb = val

    }
  }
}